package com.rico.deploy.service.impl;

import com.rico.deploy.entity.BeginCourse;
import com.rico.deploy.mapper.BeginCourseMapper;
import com.rico.deploy.service.BeginCourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 夏智力
 * @FileName BeginCourseServiceImpl
 * @date 2021/5/2 17:34
 * @Software: IntelliJ IDEA
 */
@Service
public class BeginCourseServiceImpl implements BeginCourseService {
    @Autowired
     private BeginCourseMapper beginCourseMapper;
    @Override
    public List<BeginCourse> selectAll() {
        return beginCourseMapper.selectAll();
    }

    @Override
    public BeginCourse selectById(Integer id) {
        return beginCourseMapper.selectByPrimaryKey(id);
    }

    @Override
    public int insertBeginCourse(BeginCourse beginCourse) {
        return beginCourseMapper.insert(beginCourse);
    }

    @Override
    public int deleteBeginCourseById(Integer id) {
        return beginCourseMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int updateBeginCourse(BeginCourse beginCourse) {
        return beginCourseMapper.updateByPrimaryKey(beginCourse);
    }
}
